using math to find square